VERSION 0.7
FROM golang:1.15-alpine3.13
WORKDIR /workspace

build:
    COPY . .
    RUN go build -o build/app.bin main.go
    SAVE ARTIFACT build/app.bin /app.bin AS LOCAL build/app.bin
    
docker:
    COPY +build/app.bin .
    ENTRYPOINT ["/workspace/app.bin"]
    SAVE IMAGE go-example:latest

